x86/microcode: Avoid undefined behaviour from signed integer overflow
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 5 Aug 2016 13:26:21 +0000 (14:26 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Aug 2016 09:09:21 +0000 (10:09 +0100)
commite64f22df3c1a0b70031ad6e8c0fc875d27cc5c3c
treef2d72d1aed0ea2f20b0e77c4897c68c7ebf7d6b7
parent71a8c219e8b7c61781f4c5a589cd8715050b9961
x86/microcode: Avoid undefined behaviour from signed integer overflow

The checksums should be calculated using unsigned 32bit integers, as they are
intended to overflow and end at 0.  Replace some other signed integers with
unsigned ones, to avoid mixed-sign comparisons.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/microcode_intel.c